/*!
 FrePPLe v6.7.0
*/

/* Customized bootstrap configuration */
@import "variables.less";

// Customize the threshold between hamburger and regular navigation
@screen-sm:                  992px;

/*** Compile bootstrap ***/

/*!
 * Bootstrap v3.4.1 (http://getbootstrap.com)
 * Copyright 2011-2015 Twitter, Inc.
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 */
// Core variables and mixins
@import "mixins.less";

// Reset and dependencies
@import "normalize.less";
@import "print.less";
// Not using the bootstrap icons:
// @import "glyphicons.less";

// Core CSS
@import "scaffolding.less";
@import "type.less";
@import "code.less";
@import "grid.less";
@import "tables.less";
@import "forms.less";
@import "buttons.less";

// Components
@import "component-animations.less";
@import "dropdowns.less";
@import "button-groups.less";
@import "input-groups.less";
@import "navs.less";
@import "navbar.less";

// Customized breadcrumb code
//@import "breadcrumbs.less";
.breadcrumb {
  padding: @breadcrumb-padding-vertical @breadcrumb-padding-horizontal;
  margin-bottom: 0;
  list-style: none;
  background-color: @breadcrumb-bg;
  color: @breadcrumb-color;
  > li {
    line-height: @line-height-base;
    color: @breadcrumb-color;
    font-size: @font-size-base;
    display: inline-block;
    + li:before {
      content: "\00a0\00a0@{breadcrumb-separator}\00a0\00a0"; // Unicode space added since inline-block means non-collapsing white-space
      font-family: @icon-font-name;
      color: @breadcrumb-color;
    }
	> a {
	  color: @navbar-default-link-color;
	  text-decoration: none;
	}
  }
}

@import "pagination.less";
@import "pager.less";
@import "labels.less";
@import "badges.less";
@import "jumbotron.less";
@import "thumbnails.less";
@import "alerts.less";
@import "progress-bars.less";
@import "media.less";
@import "list-group.less";
@import "panels.less";
@import "responsive-embed.less";
@import "wells.less";
@import "close.less";

// Components w/ JavaScript
@import "modals.less";
@import "tooltip.less";
@import "popovers.less";
@import "carousel.less";

// Utility classes
@import "utilities.less";
@import "responsive-utilities.less";

/*** FrePPLe styles and overrides start here. ***/

alert-danger {
  color: #000;
}

legend {
  text-transform: capitalize;
}
/* Navigation bar */

.nav {
  li a {
    padding-left: 10px;
    padding-right: 10px;
  }
  .nav>li {/* fixes for django admin forms */
    font-size: @font-size-base;
    line-height: @line-height-base;
  }
}

/* Commented because it collides with odoo theme
#nav-menu{
  .dropdown-menu {
    background-color: darken(@navbar-default-bg, 15%);
  }
  ul.dropdown-menu li a:hover {
    background-color: darken(@navbar-default-bg, 25%);
  }
}
*/

.navbar {
  text-transform: capitalize;
  margin-bottom: 0px;
  user-select: none;
  .dropdown-menu .divider {
    margin: 7px 0; //the default is 8px but would not show in chrome
  }
  .dropdown-menu>li>a { /*fix django admin*/
    font-size: @font-size-base;

  }
  .navbar-nav>li>.dropdown-menu {
    margin-top: 0px;
    border-radius: @border-radius-base;
  }
}

.navbar-brand img {
  height: (@navbar-height - 10px);
}

.breadcrumbrow {
  border-top: 1px solid darken(@navbar-default-bg, 15%);
}

.fa-caret-right {
  color: @text-color;
}

.login img {
  width: 100%;
}

/* Do we need this? Doesn't look very clean and is too generic. */
td a :not[role=button], td a:link :not[role=button], td a:visited :not[role=button] {
  color: @text-color;
}

button:active, button:focus, input:active, input:focus { outline: none; }

.alert-danger {
  color: #000;
}

.red {
  color: red;
}

.editablepivotcol {
  line-height: 21px;
  display: block;
}

.handle {
  color:  @nav-tabs-border-color;
  cursor: ns-resize;
  transform : scale(3,0.8);
  bottom: 0px;
}

div.selectdb {
  padding-top: 2px;
  padding-bottom: 2px;
  overflow-x: hidden;  // Cover situations with very long scenario names
  ul {
    overflow-x: hidden;
    left: auto;  // Align with right edge
    right: 15px; // Align with right edge
  }
  select { /*fix django admin*/
    padding: 0px;
    border-color: @input-border;
  }
}

ul li { /*fix django admin*/
    list-style-type: none;
}

li, dt, dd {
    font-size: @font-size-base; /* fix django admin form problems */
}

div.tt-menu.tt-open {
  width: 150%;
}

.tt-menu {
  .dropdown-menu;
/*  background-color: @dropdown-bg;
  -webkit-border-radius: @border-radius-base;
  -moz-border-radius: @border-radius-base;
  border-radius:@border-radius-base;
  padding-top: 5px;
  margin-top: 5px;
*/  max-height: 500px;
  overflow-y: auto;
}

div.tt-dataset.tt-dataset-search {
  background-color: @dropdown-bg;
  li.tt-suggestion.tt-selectable {
    padding-bottom: 2px;
    padding-top: 2px;
    background-color: @dropdown-bg;
    line-height: @line-height-base;
    display: block;
    list-style-type: none;

    a:link, a:visited {
      background-color: inherit;
      color: @dropdown-link-color;
      font-size: @font-size-base; /* fix django admin form problems */
      padding-left: 16px;
      text-align: left;
    }
  }
  
  li.tt-suggestion.tt-selectable a {
    display: block;
    white-space: nowrap;
    overflow:hidden;
  }
  
  li.tt-suggestion.tt-selectable div {
    position: relative;
    top: -1em;
    margin-top: -4px;
    margin-right: 5px;
    float:right;
  } 
  
  li.tt-suggestion.tt-selectable:hover {
    background-color: @dropdown-link-hover-bg;
    a:link:hover {
      background-color: inherit;
      color: @dropdown-link-hover-color;
      padding-left: 16px;
      text-align: left;
    }
  }
  span.tt-suggestion.tt-selectable {
    p {
      margin-top: 5px;
      margin-bottom: 1px;
      text-align: center;
      background-color: @input-bg;
    }
    li.divider {
      height:1px;
      margin-bottom: 2px;
      margin-top: 1px;
      overflow:hidden;
      background-color: @dropdown-divider-bg;
    }
  }
}

span.underline { //fix for odoo theme
  a:link, a:visited, a:hover {
      color: @link-color;
      text-decoration: none;
  }
}

a:link :not[role=button], a:visited :not[role=button] {
    color: @link-color;
    text-decoration: none;
}

label{
  font-weight: normal;
}

.small {
    font-size: 70%;
}

/* Tabs styles. */
ul.nav.nav-tabs {
  float: right;
  border-width: 0px 0px 1px 0px;
  border-color-bottom: @nav-tabs-border-color;
  li {
    margin: -1px;
    > a {
      border-radius: 0px;
      border-width: 2px 0px 1px 0px;
      color: @nav-tabs-border-color;
      border-bottom-color: @nav-tabs-border-color;
      background: transparent;
    }
    > a:hover {
      color: @nav-tabs-link-hover-border-color;
      border-bottom-color: @nav-tabs-link-hover-border-color;
      background: transparent;
    }
  }
  li.active {
    > a {
      border-width: 2px 0px 1px 0px;
      color: @nav-tabs-active-link-hover-color;
      border-top-color: @nav-tabs-active-link-hover-border-color;
      border-bottom-color: @nav-tabs-active-link-hover-border-color;
    }
    > a:hover {
      color: @nav-tabs-active-link-hover-color;
      border-top-color: @nav-tabs-active-link-hover-border-color;
      border-bottom-color: @nav-tabs-active-link-hover-border-color;
    }
  }
}


/* Toolicons styles. */
#toolicons, #save_undo {
  line-height: 2.2em;
}

#toolicons div.btn-group[role=group] button:not(.active) {
  background-color: @body-bg;
  color: @brand-primary;
}


/* Cockpit styles. */

.cockpitcolumn {
  padding-bottom: 0px;
  min-height: 10px;

  .panel-placeholder {
    height: 50px;
    background: lighten(@panel-default-heading-bg, 15%);
    margin-top: 10px;
    margin-bottom: 10px;
  }
}

.panel {
  box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.4);
}

/* Modals */
.modal-content {
     box-shadow: 0 3px 9px rgba(0,0,0,0.5);
}

/* disable dark background in tour modal dialog */
.modal-backdrop {
    background: none;
}

/* enable scrollbar on page body while modal is open */
.modal-open {
    overflow: auto;
    padding-right: 0!important; /*to fix the left shifting of the entire body of the page*/
}


/* Gantt charts */

.time {
  vector-effect: non-scaling-stroke;
  stroke-width: 1px;
  stroke: rgb(0,0,0);
}

.axis path, .axis line, .miniaxis path {
  fill: none;
  stroke: #000;
  shape-rendering: crispEdges;
}

.graphline {
  stroke-width: 2;
  fill: none;
}

.svgheadertext {
  text-anchor: middle;
}

/* Raw id fields are too small by default. */

.vForeignKeyRawIdAdminField {
    width: 20em;
}

/* Marking of edited and selected items. */

.dirty-cell, input.ng-dirty {
  background: @brand-danger !important;
}

tr.ui-state-highlight {
  border: 1px solid @brand-danger !important;
  background: lighten(@brand-danger, 15%) !important;
}

/* Helper styles */

.hor-align-right {
		text-align: right;
}

.ver-align-middle {
	vertical-align: middle;
}

.alignleft {
  text-align: left;
}

.aligncenter {
  text-align: center;
}

.underline, .underline:hover {
  text-decoration: underline;
}

.leftpadding {
  padding-left: 5px;
}

/* to style file upload button */
.fileUpload {
    position: relative;
    overflow: hidden;
    margin: 10px;
}
.fileUpload input.spreadsheet {
    position: absolute;
    top: 0;
    right: 0;
    margin: 0;
    padding: 0;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    filter: alpha(opacity=0);
}

/* Graph cell in pivot grid */

.graphcell {
  margin-top: 2px;
  margin-bottom: 2px;
}

.dropdown-menu {
  li a {
    cursor: pointer;
  }
}

/* Checkboxes on admin forms */

.control-group .controls .checkbox input[type=checkbox] {
  position: relative;
  margin-left: 0;
  transform: scale(1.5);
}


/*+++++++++++++++++++++++++++++++++++++*/
/* jqgrid styles */

.ui-jqdialog {
  font-size: @font-size-base;
  padding: @padding-base-vertical @padding-base-horizontal;
  .custom-dlg-header {
    background-color: @table-bg;
    background-color: @modal-content-bg;
    border-top-left-radius: @border-radius-large;
    border-top-right-radius:@border-radius-large;
  };
  .ui-jqdialog-titlebar {
    padding: @modal-title-padding;
    position: relative;
    font-size: @font-size-base;
    border-left: 0 none;
    border-right: 0 none;
    border-top: 0 none;
    > .ui-jqdialog-titlebar-close {
      .close
    };
  };
  .custom-dlg-header {
    background-color: @modal-content-bg;
    border-top-left-radius: @border-radius-large;
    border-top-right-radius:@border-radius-large;
  };
  .ui-jqdialog-content {
    .ui-jqdialog-content;
  }
}

.ui-jqdialog.ui-jqgrid-bootstrap .ui-jqdialog-titlebar {
  font-size: @font-size-h4;
  font-family: inherit;
  font-weight: 500;
  color: inherit;
}

.ui-jqdialog-content {
  border: 0;
  background: @modal-content-bg;
  height: auto;
  .CaptionTD {
    padding: @modal-inner-padding;
  };
}

/* ----------------------- */

.ui-jqgrid {
  .ui-separator {
    height: 12px;
    border-left: 1px solid @table-border-color;
    border-right: 1px solid @table-border-color;
    margin: -1px;
    float: right;
  };

  .ui-jqgrid-labels th.ui-th-column {
    .ui-jqgrid-labels .ui-th-column-header;
  };

  > .ui-jqgrid-view {
    font-size: @font-size-base;
  };
  .ui-jqgrid-errorbar, .ui-jqgrid-titlebar {
    .ui-jqdialog .ui-jqdialog-titlebar;
  };
  tr.jqgrow, tr.jqgroup, tr.jqfoot, tr.ui-subgrid {
    > td {
        overflow: hidden;
        white-space: nowrap; //disable wrap
        height: @input-height-small ;
        border-top: 0 none;
        border-bottom-width: 1px;
        border-bottom-style: solid;
    };
  };
  .ui-jqgrid-btable td.jqgrid-rownum {
    padding: @table-condensed-cell-padding @table-condensed-cell-padding;
  };
}

.ui-jqgrid.ui-jqgrid-bootstrap{
  border: 1px solid @table-border-color;
  border-radius: @border-radius-large;

  tr.jqgfirstrow {
    > td {
      padding: 0 @table-cell-padding;
    };
  }

  tr.jqgrow, tr.jqgroup, tr.jqfoot {
    > td {
      padding: @table-condensed-cell-padding @table-condensed-cell-padding;
    };
  }

  .custom-title-div {
    background-color: @table-bg;
    .ui-jqdialog .custom-dlg-header;
  };
  .custom-hdiv {
    background-color: @gray-light;
  };
  .ui-jqgrid-titlebar, ui-jqgrid-errorbar {
    font-size: @font-size-h4;
    font-family: inherit;
    font-weight: 500;
    color: inherit;
  };
  > .ui-jqgrid-view {
    font-size: @font-size-base;
  };
  sgbutton-div {
    .sgbutton.btn:focus, .sgbutton.btn:hover {
      border: 1px solid darken(@btn-default-border, 20%);
    };
  };
  > .ui-jqgrid-pager {
    font-size: @font-size-base;
  };

}

.table-striped>tbody>tr:nth-of-type(odd) {
background-color: @table-bg-accent;
}

.table.table-condensed.table-hover:not(.ui-jqgrid-btable) tr>td {
  border-width: 0px;
}

.table.table-condensed.table-hover:not(.ui-jqgrid-btable) thead>tr>th {
  border-width: 1px;
}

.ui-jqgrid-labels .ui-th-column-header {
  background-color: lighten(@gray-light, 20%);
  overflow: hidden;
  white-space: nowrap;
  text-align: center;
}

.ui-jqgrid-view {
  > .ui-userdata {
    background-color: @gray-lighter;
  };
  > .ui-jqgrid-sdiv td {
    background-color: @gray-lighter;
  };
}

.ui-jqgrid-bootstrap.ui-jqgrid-resize-mark {
  border: 1px solid @gray;
  background-color: inherit;
  color: @gray-darker;
  font-weight: bold;
}

.ui-pager-control{
  .ui-pg-input {
    display: inline-block;
    font-size: @font-size-base;
    padding: @padding-base-vertical @padding-base-horizontal;
  };
  .ui-pg-selbox {
    font-size: @font-size-base;
    padding: 0;
  };
}



.fm-button .fm-button-text {
  padding: @padding-xs-vertical @padding-xs-horizontal;
}

.delmsg {
  padding: @alert-padding;
}

.modal .custom-dlg-window .ui-jqgrid-bootstrap .ui-jqdialog {
  z-index: @zindex-modal;
}

.ui-jqgrid .ui-resizable-se.fa {
  font-size: @font-size-base;
  opacity: 0.8;
}
.ui-jqgrid-titlebar > .ui-jqgrid-titlebar-close {
  .close
}

// fix for django admin bootstraped wrong class name
.col-md- {
    width: 100%;
    position: relative;
    min-height: 1px;
    padding-left: 15px;
    padding-right: 15px;
 }

// fix for ui-jqgrid style
.bootstrap-datetimepicker-widget {
    white-space: initial;
}

// Used when dropping a file on an editable grid
.dropfile {
  cursor: copy;
}

.text-capitalize-first:first-letter {
  text-transform: capitalize
}

// Used for the hovering tooltip in the graphs

#tooltip {
  padding-top: 5px;
  padding-bottom: 5px;
}

#tooltip td {
  padding-left: 5px;
  padding-right: 5px;
}

// Circle for the wizard

.circle {
    width: 1.2em;
    height: 1.2em;
    border-radius: 0.6em;
    color: #fff;
    text-align: center;
    background: @brand-primary;
    display: inline-block;
}

// Link to password change form on the user edit screen

span.help-block a {
    text-decoration: underline;
    font-weight: bold;
} 